/*
 Navicat MySQL Dump SQL

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50744 (5.7.44)
 Source Host           : 127.0.0.1:3306
 Source Schema         : rx-test

 Target Server Type    : MySQL
 Target Server Version : 50744 (5.7.44)
 File Encoding         : 65001

 Date: 14/10/2024 13:56:41
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for common_config
-- ----------------------------
DROP TABLE IF EXISTS `common_config`;
CREATE TABLE `common_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `key` varchar(50) NOT NULL DEFAULT '' COMMENT 'key',
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
  `value` text COMMENT '值',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
  `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='公共配置';

-- ----------------------------
-- Records of common_config
-- ----------------------------
BEGIN;
INSERT INTO `common_config` (`id`, `key`, `name`, `value`, `is_deleted`, `add_time`, `update_time`) VALUES (1, 'chinese_last_name', '中国人姓氏', '赵,钱,孙,李,周,吴,郑,王,冯,陈,褚,卫,蒋,沈,韩,杨,朱,秦,尤,许,何,吕,施,张,孔,曹,严,华,金,魏,陶,姜,戚,谢,邹,喻,柏,水,窦,章,云,苏,潘,葛,奚,范,彭,郎,鲁,韦,昌,马,苗,凤,花,方,任,袁,柳,鲍,史,唐,费,薛,雷,贺,倪,汤,滕,殷,罗,毕,郝,安,常,傅,卞,齐,元,顾,孟,平,黄,穆,萧,尹,姚,邵,湛,汪,祁,毛,狄,米,伏,成,戴,谈,宋,茅,庞,熊,纪,舒,屈,项,祝,董,梁,杜,阮,蓝,闵,季,贾,路,娄,江,童,颜,郭,梅,盛,林,钟,徐,邱,骆,高,夏,蔡,田,樊,胡,凌,霍,虞,万,支,柯,管,卢,莫,柯,房,裘,缪,解,应,宗,丁,宣,邓,单,杭,洪,包,诸,左,石,崔,吉,龚,程,嵇,邢,裴,陆,荣,翁,荀,于,惠,甄,曲,封,储,仲,伊,宁,仇,甘,武,符,刘,景,詹,龙,叶,幸,司,黎,溥,印,怀,蒲,邰,从,索,赖,卓,屠,池,乔,胥,闻,莘,党,翟,谭,贡,劳,逄,姬,申,扶,堵,冉,宰,雍,桑,寿,通,燕,浦,尚,农,温,别,庄,晏,柴,瞿,阎,连,习,容,向,古,易,廖,庾,终,步,都,耿,满,弘,匡,国,文,寇,广,禄,阙,东,欧,利,师,巩,聂,关,荆,司马,上官,欧阳,夏侯,诸葛,闻人,东方,赫连,皇甫,尉迟,公羊,澹台,公冶,宗政,濮阳,淳于,单于,太叔,申屠,公孙,仲孙,轩辕,令狐,徐离,宇文,长孙,慕容,司徒,司空', 0, '2024-03-22 13:42:30', '2024-03-22 13:44:45');
INSERT INTO `common_config` (`id`, `key`, `name`, `value`, `is_deleted`, `add_time`, `update_time`) VALUES (2, 'chinese_first_name', '中国人名字', '伟,刚,勇,毅,俊,峰,军,平,保,东,文,辉,力,明,永,健,世,广,志,义,兴,良,海,山,仁,波,宁,贵,福,生,龙,元,全,国,胜,学,祥,才,发,武,新,利,清,飞,彬,富,顺,信,子,杰,涛,昌,成,康,星,光,天,达,安,岩,中,茂,进,林,有,坚,和,彪,博,诚,先,敬,震,振,壮,会,思,群,豪,心,邦,承,乐,绍,功,松,善,厚,庆,磊,民,友,裕,河,哲,江,超,浩,亮,政,谦,亨,奇,固,之,轮,翰,朗,伯,宏,言,若,鸣,朋,斌,梁,栋,维,启,克,伦,翔,旭,鹏,泽,晨,辰,士,以,建,家,致,树,炎,德,行,时,泰,盛,雄,琛,钧,冠,策,腾,楠,榕,风,航,弘,秀,娟,英,华,慧,巧,美,娜,静,淑,惠,珠,翠,雅,芝,玉,萍,红,娥,玲,芬,芳,燕,彩,春,菊,兰,凤,洁,梅,琳,素,云,莲,真,环,雪,荣,爱,妹,霞,香,月,莺,媛,艳,瑞,凡,佳,嘉,琼,勤,珍,贞,莉,桂,娣,叶,璧,璐,娅,琦,晶,妍,茜,秋,珊,莎,锦,黛,青,倩,婷,姣,婉,娴,瑾,颖,露,瑶,怡,婵,雁,蓓,纨,仪,荷,丹,蓉,眉,君,琴,蕊,薇,菁,梦,岚,苑,婕,馨,瑗,琰,韵,融,园,艺,咏,卿,聪,澜,纯,毓,悦,昭,冰,爽,琬,茗,羽,希,欣,飘,育,滢,馥,筠,柔,竹,霭,凝,晓,欢,霄,枫,芸,菲,寒,伊,亚,宜,可,姬,舒,影,荔,枝,丽,阳,妮,宝,贝,初,程,梵,罡,恒,鸿,桦,骅,剑,娇,纪,宽,苛,灵,玛,媚,琪,晴,容,睿,烁,堂,唯,威,韦,雯,苇,萱,阅,彦,宇,雨,洋,忠,宗,曼,紫,逸,贤,蝶,菡,绿,蓝,儿,翠,烟', 0, '2024-03-22 13:45:01', '2024-03-22 13:45:25');
COMMIT;

-- ----------------------------
-- Table structure for demo
-- ----------------------------
DROP TABLE IF EXISTS `demo`;
CREATE TABLE `demo` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `type` int(11) NOT NULL COMMENT '类型:1类型A,2类型B',
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态:1正常,2异常',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
  `creator_id` int(11) NOT NULL COMMENT '创建人id',
  `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `type` (`type`) COMMENT '类型'
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='demo表';

-- ----------------------------
-- Records of demo
-- ----------------------------
BEGIN;
INSERT INTO `demo` (`id`, `type`, `name`, `status`, `is_deleted`, `creator_id`, `add_time`, `update_time`) VALUES (1, 1, '测试', 1, 1, 1, '2024-01-12 14:38:24', '2024-03-20 16:11:44');
INSERT INTO `demo` (`id`, `type`, `name`, `status`, `is_deleted`, `creator_id`, `add_time`, `update_time`) VALUES (2, 2, 'thinkphp', 2, 0, 206, '2024-01-12 14:38:56', '2024-03-20 16:11:46');
COMMIT;

-- ----------------------------
-- Table structure for operate_log
-- ----------------------------
DROP TABLE IF EXISTS `operate_log`;
CREATE TABLE `operate_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `category` varchar(50) NOT NULL COMMENT '业务类别',
  `data_id` int(11) NOT NULL COMMENT '业务类别对应的数据id',
  `operate_type` tinyint(1) NOT NULL COMMENT '操作类型: 1添加，2修改，3删除',
  `before_data` text COMMENT '修改前数据',
  `after_data` text COMMENT '修改后数据',
  `creator_id` int(11) NOT NULL DEFAULT '0' COMMENT '创建人id',
  `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  PRIMARY KEY (`id`),
  KEY `table_name_id` (`category`,`data_id`) COMMENT '关联数据表名和数据id'
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='通用操作日志表';

-- ----------------------------
-- Records of operate_log
-- ----------------------------
BEGIN;
INSERT INTO `operate_log` (`id`, `category`, `data_id`, `operate_type`, `before_data`, `after_data`, `creator_id`, `add_time`) VALUES (1, 'user', 1, 2, '{\"mobile\":\"188888\",\"nickname\":\"张小122胖\",\"status\":2}', '{\"nickname\":\"的规范\",\"mobile\":\"177888\",\"status\":1}', 1, '2024-03-27 10:47:01');
INSERT INTO `operate_log` (`id`, `category`, `data_id`, `operate_type`, `before_data`, `after_data`, `creator_id`, `add_time`) VALUES (2, 'user', 1, 2, '{\"nickname\":\"的规范\"}', '{\"nickname\":\"王先生\"}', 1, '2024-03-27 10:47:57');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `username` varchar(50) NOT NULL DEFAULT '' COMMENT '用户名',
  `mobile` varchar(50) NOT NULL DEFAULT '' COMMENT '手机号',
  `password` varchar(255) NOT NULL DEFAULT '' COMMENT '密码',
  `nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '昵称',
  `avatar` varchar(512) NOT NULL DEFAULT '' COMMENT '头像URL',
  `last_login_time` datetime DEFAULT NULL COMMENT '最后一次登录时间',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态:1正常,2禁用',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
  `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户表';

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `username`, `mobile`, `password`, `nickname`, `avatar`, `last_login_time`, `status`, `is_deleted`, `add_time`, `update_time`) VALUES (1, 'jihongchu', '177888', '', '王先生', 'https://profile-avatar.csdnimg.cn/default.jpg', '2024-03-22 14:42:14', 1, 0, '2024-03-22 14:42:14', '2024-03-27 10:47:57');
INSERT INTO `user` (`id`, `username`, `mobile`, `password`, `nickname`, `avatar`, `last_login_time`, `status`, `is_deleted`, `add_time`, `update_time`) VALUES (2, 'tongtaicai', '1824120', '', '通泰才', 'https://profile-avatar.csdnimg.cn/default.jpg', '2024-03-22 14:42:14', 1, 0, '2024-03-22 14:42:14', '2024-03-22 15:13:57');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
